﻿using System;

namespace CodeCounsel.SharePoint.RibbonDesigner.Model
{
    public abstract class RibbonDocument
    {
        protected DomainElement RootElement { get; private set; }
        public CommandUIModel GlobalModel { get; private set; }

        protected RibbonDocument(CommandUIModel owner, DomainElement rootDomainModel)
        {
            GlobalModel = owner;
            RootElement = rootDomainModel;
            if (rootDomainModel != null)
            {
                rootDomainModel.SetDefinition(this);
            }
        }
    }
}
